Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to make the selection of a combo box item compulsory?
Posted
Updated 19-Feb-12 21:29pm
v2
Comments
E.F. Nijboer 20-Feb-12 3:14am    
Please edit the question to make it more clear what you mean.
Varun Sareen 20-Feb-12 3:30am    
edited for: spelling mistakes

Check this on Selected Index Changed Event of ComboBox

C#
if(cmbComboBox.SelectedIndex == -1)
{
    MessageBox.Show("Enter The Value. Blank Not Allowed");
    cmbComboBox.Focus;
    return;
}


Hope this will help you
 
Share this answer
 
Another way is, you can have reqired field validator set to combobox.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900